-- TJ_DJ definition

CREATE TABLE "TJ_DJ"
(
    "ID" NUMBER(*,0) NOT NULL ENABLE,
    "JH" VARCHAR2(100),
    "IP" VARCHAR2(100),
    "DW" NUMBER(*,0),
    "GX" NUMBER(*,0),
    "ZK" VARCHAR2(100),
    CONSTRAINT "t_djxx_PK" PRIMARY KEY ("ID")
        USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
        STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
        PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
        TABLESPACE "USERS" ENABLE
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";

CREATE
OR REPLACE TRIGGER "TRG_DJXX"
  BEFORE INSERT ON "TJ_DJ"
  FOR EACH ROW
BEGIN
SELECT SEQ_DJXX.NEXTVAL
INTO :new.id
FROM DUAL;
END;
/
ALTER
TRIGGER "TRG_DJXX" ENABLE;

CREATE UNIQUE INDEX "t_djxx_PK" ON "TJ_DJ" ("ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";


-- TJ_MENU definition

CREATE TABLE "TJ_MENU"
(
    "ID"       NUMBER(38,0) NOT NULL ENABLE,
    "NAME"     VARCHAR2(100) DEFAULT NULL,
    "PATH"     VARCHAR2(100) DEFAULT NULL,
    "PID"      NUMBER(10,0),
    "PAGEFILE" VARCHAR2(100),
    "XH"       NUMBER(*,0),
    PRIMARY KEY ("ID")
        USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
        STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
        PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
        TABLESPACE "USERS" ENABLE
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";

CREATE
OR REPLACE TRIGGER "TRG_TJ_MENU"
  BEFORE INSERT ON TJ_MENU
  FOR EACH ROW
BEGIN
SELECT SEQ_TJ_MENU.NEXTVAL
INTO :new.id
FROM DUAL;
END;
/
ALTER
TRIGGER "TRG_TJ_MENU" ENABLE;

CREATE UNIQUE INDEX "SYS_C0040404" ON "TJ_MENU" ("ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";


-- TJ_ROLE definition

CREATE TABLE "TJ_ROLE"
(
    "ROLE_ID"     NUMBER(38,0) NOT NULL ENABLE,
    "ROLE_NAME"   VARCHAR2(100) NOT NULL ENABLE,
    "DESCRIPTION" VARCHAR2(100) DEFAULT NULL,
    PRIMARY KEY ("ROLE_ID")
        USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
        STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
        PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
        TABLESPACE "USERS" ENABLE
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";

CREATE
OR REPLACE TRIGGER "TRG_TJ_ROLE"
  BEFORE INSERT ON TJ_ROLE
  FOR EACH ROW
BEGIN
SELECT SEQ_TJ_ROLE.NEXTVAL
INTO :new.role_id
FROM DUAL;
END;

/
ALTER
TRIGGER "TRG_TJ_ROLE" ENABLE;

CREATE UNIQUE INDEX "SYS_C0040395" ON "TJ_ROLE" ("ROLE_ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";


-- TJ_DW definition

CREATE TABLE "TJ_DW"
(
    "ID"     NUMBER(*,0) NOT NULL ENABLE,
    "DWNAME" VARCHAR2(100),
    "DWJB"   NUMBER(*,0),
    "PID"    NUMBER(*,0),
    CONSTRAINT "TJ_DW_PK" PRIMARY KEY ("ID")
        USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
        STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
        PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
        TABLESPACE "USERS" ENABLE
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";

ALTER TABLE "TJ_DW"
    ADD CONSTRAINT "FK_TJ_DW" FOREIGN KEY ("PID")
        REFERENCES "TJ_DW" ("ID") ENABLE;

CREATE
OR REPLACE TRIGGER "TRG_TJ_DW"
  BEFORE INSERT ON TJ_DW
  FOR EACH ROW
BEGIN
SELECT SEQ_TJ_DW.NEXTVAL
INTO :new.id
FROM DUAL;
END;

/
ALTER
TRIGGER "TRG_TJ_DW" ENABLE;

CREATE UNIQUE INDEX "TJ_DW_PK" ON "TJ_DW" ("ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";


-- TJ_GX definition

CREATE TABLE "TJ_GX"
(
    "ID"   NUMBER(*,0),
    "NAME" VARCHAR2(100),
    "DW"   NUMBER(*,0),
    CONSTRAINT "TJ_GX_PK" PRIMARY KEY ("ID")
        USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
        STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
        PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
        TABLESPACE "USERS" ENABLE
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";

ALTER TABLE "TJ_GX"
    ADD CONSTRAINT "FK_TJ_GXDW" FOREIGN KEY ("DW")
        REFERENCES "TJ_DW" ("ID") ENABLE;

CREATE
OR REPLACE TRIGGER "TRG_TJ_GX"
  BEFORE INSERT ON TJ_GX
  FOR EACH ROW
BEGIN
SELECT SEQ_TJ_GX.NEXTVAL
INTO :new.id
FROM DUAL;
END;

/
ALTER
TRIGGER "TRG_TJ_GX" ENABLE;

CREATE UNIQUE INDEX "TJ_GX_PK" ON "TJ_GX" ("ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";


-- TJ_ROLEMENU definition

CREATE TABLE "TJ_ROLEMENU"
(
    "ROLEID" NUMBER NOT NULL ENABLE,
    "MENUID" NUMBER NOT NULL ENABLE
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";

ALTER TABLE "TJ_ROLEMENU"
    ADD CONSTRAINT "FK_TJ_MENU" FOREIGN KEY ("MENUID")
        REFERENCES "TJ_MENU" ("ID") ENABLE;

ALTER TABLE "TJ_ROLEMENU"
    ADD CONSTRAINT "FK_TJ_ROLE" FOREIGN KEY ("ROLEID")
        REFERENCES "TJ_ROLE" ("ROLE_ID") ENABLE;


-- TJ_USER definition

CREATE TABLE "TJ_USER"
(
    "ID"       NUMBER(*,0) NOT NULL ENABLE,
    "USERNAME" VARCHAR2(100),
    "PASSWORD" VARCHAR2(100),
    "ROLEID"   NUMBER(*,0),
    CONSTRAINT "TJ_USER_PK" PRIMARY KEY ("ID")
        USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
        STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
        PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
        TABLESPACE "USERS" ENABLE
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";

ALTER TABLE "TJ_USER"
    ADD CONSTRAINT "FK_TJUSERROLE" FOREIGN KEY ("ROLEID")
        REFERENCES "TJ_ROLE" ("ROLE_ID") ENABLE;

CREATE
OR REPLACE TRIGGER "TRG_TJ_USER"
  BEFORE INSERT ON TJ_USER
  FOR EACH ROW
BEGIN
SELECT SEQ_TJ_USER.NEXTVAL
INTO :new.id
FROM DUAL;
END;
/
ALTER
TRIGGER "TRG_TJ_USER" ENABLE;

CREATE UNIQUE INDEX "TJ_USER_PK" ON "TJ_USER" ("ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS";



CREATE SEQUENCE SEQ_DJXX INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_TJ_DW INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_TJ_GX INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_TJ_MENU INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_TJ_ROLE INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_TJ_USER INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;






create table "TJ_LOG"
(
    "ID"         NUMBER(*,0) NOT NULL ENABLE,
    "USERNAME"     VARCHAR2(100) not null,
    "IP"         VARCHAR2(100),
    "OPTYPE"     VARCHAR2(100),
    "OPCONTENT"  varchar2(100),
	"RES"  varchar2(100),
    "CREATEDATE" date not null,
    CONSTRAINT "TJ_LOG_PK" PRIMARY KEY ("ID")
)

CREATE SEQUENCE SEQ_TJ_LOG INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_TJ_LOG INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;
CREATE
OR REPLACE TRIGGER "TRG_TJ_LOG"
  BEFORE INSERT ON TJ_LOG
  FOR EACH ROW
BEGIN
:new.id := SEQ_TJ_LOG.NEXTVAL;
END;



CREATE TABLE TJ_USERROLE (
                             USERID NUMBER NULL,
                             ROLEID NUMBER NULL
);



create table "TJ_MENUGROUP"
(
    "ID"         		NUMBER(*,0) NOT NULL ENABLE,
    "NAME"     			VARCHAR2(100) not null,
	"ROUTEPATH"			VARCHAR2(100),
    "ROOTMENUIDS" 		VARCHAR2(100),
    CONSTRAINT "TJ_MENUGROUP_PK" PRIMARY KEY ("ID")
)

CREATE SEQUENCE SEQ_TJ_MENUGROUP INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;
CREATE
OR REPLACE TRIGGER "TRG_TJ_MENUGROUP"
  BEFORE INSERT ON TJ_MENUGROUP
  FOR EACH ROW
BEGIN
    select SEQ_TJ_MENUGROUP.NEXTVAL into :new.id from dual;
END;


create table "TJ_DEVTYPE"
(
    "ID"      NUMBER(*,0) NOT NULL ENABLE,
    "NAME"    VARCHAR2(100) not null,
    CONSTRAINT "TJ_DEVTYPE_PK" PRIMARY KEY ("ID")
)

CREATE SEQUENCE SEQ_TJ_DEVTYPE INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE
OR REPLACE TRIGGER "TRG_TJ_DEVTYPE"
  BEFORE INSERT ON TJ_DEVTYPE
  FOR EACH ROW
BEGIN
    select SEQ_TJ_DEVTYPE.NEXTVAL into :new.id from dual;
END;

create table "TJ_DEV"
(
    "ID"      NUMBER(*,0) NOT NULL ENABLE,
    "NAME"    VARCHAR2(100) not null,
    "IP"      VARCHAR2(100),
    "DEVTYPE" NUMBER(*,0) NOT NULL,
    "DWID" NUMBER(*,0) NOT NULL,
    CONSTRAINT "TJ_DEV_PK" PRIMARY KEY ("ID")
)

CREATE SEQUENCE SEQ_TJ_DEV INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE
OR REPLACE TRIGGER "TRG_TJ_DEV"
  BEFORE INSERT ON TJ_DEV
  FOR EACH ROW
BEGIN
    :new.id := SEQ_TJ_DEV.NEXTVAL;
END;

create table "TJ_SPECIALTYPE"
(
    "ID"       NUMBER(*,0) NOT NULL ENABLE,
    "NAME"     VARCHAR2(100)        not null,
    "DEVTYPEID"  NUMBER(*,0) NOT NULL,
    "FUNCODE"  NUMBER(*,0)
    CONSTRAINT "TJ_SPECIALTYPE_PK" PRIMARY KEY ("ID")
)

CREATE SEQUENCE SEQ_TJ_SPECIALTYPE INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE
OR REPLACE TRIGGER "TRG_TJ_SPECIALTYPE"
  BEFORE INSERT ON TJ_SPECIALTYPE
  FOR EACH ROW
BEGIN
    select SEQ_TJ_SPECIALTYPE.NEXTVAL into :new.id from dual;
END;

create table "TJ_REG"
(
    "ID"       NUMBER(*,0) NOT NULL ENABLE,
    "NAME"     VARCHAR2(100)        not null,
    "LOCATION" VARCHAR2(100),
    "SPECIALTYPEID"   NUMBER(*,0),
    "DEVID"    NUMBER(*,0) NOT NULL,
    CONSTRAINT "TJ_REG_PK" PRIMARY KEY ("ID")
)

CREATE SEQUENCE SEQ_TJ_REG INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE
OR REPLACE TRIGGER "TRG_TJ_REG"
  BEFORE INSERT ON TJ_REG
  FOR EACH ROW
BEGIN
    :new.id := SEQ_TJ_REG.NEXTVAL;
END;



INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(1, '系统管理', '/', NULL, 'HomeView.vue', 500, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(2, '用户管理', 'user', 1, 'User.vue', 100, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(3, '角色管理', 'role', 1, 'Role.vue', 200, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(4, '菜单管理', 'mebnu', 1, 'Menu.vue', 300, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(5, '远程管理', '/ycgl', NULL, 'HomeView.vue', 100, '/ycgl/tj2');
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(6, '远程控制', 'tj2', 5, 'CyjTJ2.vue', 100, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(7, '操作记录', 'oplog', 5, 'OPLOG.vue', 200, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(8, '基础信息维护', '/jcxxwh', NULL, 'HomeView.vue', 200, '/jcxxwh/djxxwh');
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(9, '单井信息维护', 'djxxwh', 8, 'DJXXWH.vue', 200, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(10, '单位信息维护', 'dwxxwh', 8, 'DWXXWH.vue', 300, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(11, '干线信息维护', 'gxxxwh', 8, 'GXXXWH.vue', 400, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(17, '主页', '/', NULL, 'HomeView.vue', 99, NULL);
INSERT INTO TJ_MENU
(ID, NAME, "PATH", PID, PAGEFILE, XH, REDIRECT)
VALUES(18, '主页', 'home', 17, 'AboutView.vue', 100, NULL);





-- WWSB.TJ_BJ_XX definition

CREATE TABLE "WWSB"."TJ_BJ_XX"
(	"ID" NUMBER(38,0),
     "LX" VARCHAR2(100),
     "BJD" VARCHAR2(100),
     "BJSJ" DATE,
     "QRSJ" DATE,
     "MSXX" VARCHAR2(4000),
     "CLR" NUMBER(38,0),
     "CLXX" VARCHAR2(100),
     "DW" NUMBER(38,0),
     "CLSJ" DATE,
     "QRR" NUMBER(38,0)
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;

CREATE OR REPLACE TRIGGER "WWSB"."TRG_BJ_XX"
  BEFORE INSERT ON TJ_BJ_XX
  FOR EACH ROW
BEGIN
    :new.id := SEQ_BJ_XX.NEXTVAL;
END;
/
ALTER TRIGGER "WWSB"."TRG_BJ_XX" ENABLE;

-- WWSB.TJ_JYGYW_YZ definition

CREATE TABLE "WWSB"."TJ_JYGYW_YZ"
(	"ID" NUMBER(38,0),
     "XX" NUMBER(38,2),
     "SX" NUMBER(38,2),
     "SJKD" NUMBER(38,0),
     "SZR" NUMBER(38,0),
     "SZSJ" DATE,
     "JH" VARCHAR2(100),
     "YJID" NUMBER(38,0)
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;

CREATE OR REPLACE TRIGGER "WWSB"."TRG_TJ_JYGYW_YZ"
  BEFORE INSERT ON "TJ_JYGYW_YZ"
  FOR EACH ROW
BEGIN
SELECT SEQ_JYGYW_YZ.NEXTVAL
INTO :new.id
FROM DUAL;
END;
/
ALTER TRIGGER "WWSB"."TRG_TJ_JYGYW_YZ" ENABLE;


-- WWSB.TJ_JYGYW_YZ foreign keys

ALTER TABLE WWSB.TJ_JYGYW_YZ ADD CONSTRAINT TJ_JYGYW_YZ_TJ_YJ_XX_FK FOREIGN KEY (YJID) REFERENCES WWSB.TJ_YJ_XX(ID) ON DELETE CASCADE;



-- WWSB.TJ_YJ_SS definition

CREATE TABLE "WWSB"."TJ_YJ_SS"
(	"ID" VARCHAR2(100),
     "CJSJ" DATE,
     "JK_HY" NUMBER(38,2),
     "JK_TY" NUMBER(38,2),
     "JK_WD" NUMBER(38,2),
     "HSL" NUMBER(38,2),
     "JYG_YW" NUMBER(38,2),
     "JH" VARCHAR2(100),
     CONSTRAINT "TJ_YJ_SS_PK" PRIMARY KEY ("ID")
         USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
         STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
         PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
         TABLESPACE "USERS"  ENABLE
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;

CREATE UNIQUE INDEX "WWSB"."TJ_YJ_SS_PK" ON "WWSB"."TJ_YJ_SS" ("ID")
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;



-- WWSB.TJ_YJ_XX definition

CREATE TABLE "WWSB"."TJ_YJ_XX"
(	"ID" NUMBER(38,0),
     "IP" VARCHAR2(100),
     "HYIP" VARCHAR2(100),
     "HYREGTYPE" NUMBER(*,0),
     "HYLOC" NUMBER(*,0),
     "HYDATATYPE" NUMBER(*,0),
     "TYIP" VARCHAR2(100),
     "TYREGTYPE" NUMBER(*,0),
     "TYLOC" NUMBER(*,0),
     "TYDATATYPE" NUMBER(*,0),
     "WDIP" VARCHAR2(100),
     "WDREGTYPE" NUMBER(*,0),
     "WDLOC" NUMBER(*,0),
     "WDDATATYPE" NUMBER(*,0),
     "HSIP" VARCHAR2(100),
     "HSREGTYPE" NUMBER(*,0),
     "HSLOC" NUMBER(*,0),
     "HSDATATYPE" NUMBER(*,0),
     "JYGYWIP" VARCHAR2(100),
     "JYGYWREGTYPE" NUMBER(*,0),
     "JYGYWLOC" NUMBER(*,0),
     "JYGYWDATATYPE" NUMBER(*,0),
     "JH" VARCHAR2(100),
     "DW" NUMBER(38,0),
     "HYBH" NUMBER(38,0),
     "TYBH" NUMBER(38,0),
     "WDBH" NUMBER(38,0),
     "HSBH" NUMBER(38,0),
     "JYGYWBH" NUMBER(38,0),
     "CYJQDLOC" NUMBER(*,0),
     "CYJTJLOC" NUMBER(38,0),
     "CYJQDFLAG" NUMBER(38,0),
     "CYJTJFLAG" NUMBER(38,0),
     "GX" NUMBER(38,0),
     CONSTRAINT "TJ_YJ_XX_PK" PRIMARY KEY ("ID")
         USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
         STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
         PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
         TABLESPACE "USERS"  ENABLE,
     CONSTRAINT "TJ_YJ_XX_UNIQUE" UNIQUE ("JH")
         USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
         STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
         PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
         TABLESPACE "USERS"  ENABLE
) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;

CREATE OR REPLACE TRIGGER "WWSB"."TRG_TJ_YJXX"
  BEFORE INSERT ON TJ_YJ_XX
  FOR EACH ROW
BEGIN
    :new.id := SEQ_TJ_YJXX.NEXTVAL;
END;
/
ALTER TRIGGER "WWSB"."TRG_TJ_YJXX" ENABLE;

CREATE UNIQUE INDEX "WWSB"."TJ_YJ_XX_PK" ON "WWSB"."TJ_YJ_XX" ("ID")
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;

CREATE UNIQUE INDEX "WWSB"."TJ_YJ_XX_UNIQUE" ON "WWSB"."TJ_YJ_XX" ("JH")
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;

CREATE SEQUENCE WWSB.SEQ_BJ_XX INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE WWSB.SEQ_JYGYW_YZ INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE WWSB.SEQ_TJ_YJXX INCREMENT BY 1 MINVALUE 0 MAXVALUE 9999999999999999999999999999 NOCYCLE NOCACHE NOORDER;
